{% extends 'common/base.html' %}
{% import "macros/_flash.html" as flash_macros %}
{% block title %}登陆-何三笔记{% endblock %}
{% block css %}
{{super()}}
<link href="{{url_for('main.static',filename='css/account.css')}}" rel="stylesheet">
{% endblock%}
{% block main %}
<div class="container">
    <div class="row">
        <div class="col-12 col-sm-8 col-md-6 offset-sm-2 offset-md-3 px-xl-5">
            <div class="card rounded-0 px-3 px-lg-4">
                <div class="card-header text-center bg-white py-2">
                    <h3 class="my-1 text-info">修改密码</h3>
                </div>
                <div class="card-body card-login">
                    <form method="POST" class="password_change">
                        {{ form.hidden_tag() }}
                        {% for field_name, field_errors in form.errors|dictsort if field_errors %}
                            {% for error in field_errors %}
                            <div class="alert alert-danger" role="alert">
                                <strong>{{ form[field_name].label }}错误：</strong> {{ error }}
                                <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                                    <span aria-hidden="true">&times;</span>
                                </button>
                            </div>
                            {% endfor %}
                        {% endfor %}
                        <div id="div_id_oldpassword" class="form-group"> 
                            <label for="pwd"
                                class="col-form-label  requiredField">
                                当前密码<span class="asteriskField">*</span> </label>
                            <div class=""> 
                                {{form.pwd(class="form-control")}}
                            </div>
                        </div>
                        <div id="div_id_password1" class="form-group"> 
                            <label for="password1"
                                class="col-form-label  requiredField">
                                新密码<span class="asteriskField">*</span> </label>
                            <div class=""> 
                                {{form.password(class="form-control")}}
                            </div>
                        </div>
                        <div id="div_id_password2" class="form-group"> 
                            <label for="password2"
                                class="col-form-label  requiredField">
                                新密码（重复）<span class="asteriskField">*</span> </label>
                            <div class=""> 
                                {{form.password2(class="form-control")}}
                            </div>
                        </div>
                        {{form.submit(class="btn btn-info btn-sm rounded-2")}}
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}